package cn.com.joycode.nimble.admin.security.authentication;

import org.springframework.security.authentication.AbstractAuthenticationToken;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;

import java.util.Collection;

public class NimbleAdminAuthenticationToken extends AbstractAuthenticationToken {

    public NimbleAdminAuthenticationToken() {
        super(AuthorityUtils.NO_AUTHORITIES);
        this.setAuthenticated(false);
    }

    public NimbleAdminAuthenticationToken(Collection<? extends GrantedAuthority> authorities) {
        super(authorities);
        this.setAuthenticated(true);
    }

    @Override
    public Object getCredentials() {
        return null;
    }

    @Override
    public Object getPrincipal() {
        return null;
    }


}
